# 随机生成一个由大小写字母组成的4位验证码

# 创建一个有大小写字母组成的数组 在里面随机抽取 4个
from random import*
code = ""
words = ["a", "b", "c", "d", "A", "B", "C", "D"]
# 循环四次 即可获取四个字母
for i in range(4):
    t = choice(words)
    code+=t # 追加字符串
print(t)
print(code)